[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Hans Hagen
: \setupinteraction [title=FooBar] \setupdocument [metadata:title=FooBar] that just sets defaults for \setupinteraction so that they inherit from document \setupmetadata [title=FooBar] that's for those who go global Are any of those deprecated or the preferred way? I'm starting to get

[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Henning Hraban Ramm
: \setupinteraction [title=FooBar] \setupdocument [metadata:title=FooBar] \setupmetadata [title=FooBar] Are any of those deprecated or the preferred way? I'm starting to get confused. There’s also \settaggedmetadata; I actually didn’t know \setupmetadata. Both are missing in the wiki yet

[NTG-context] Re: missing metadata in LMTX

2024-03-06 Thread Marco Patzer
ction [title=FooBar] \setupdocument [metadata:title=FooBar] \setupmetadata [title=FooBar] Are any of those deprecated or the preferred way? I'm starting to get confused. Marco ___ If your question is of interest to o

Re: [NTG-context] \getbuffer without extra whitespace?

2023-05-29 Thread Wolfgang Schuster via ntg-context
command \starttext \startbuffer[version] 20230529a \stopbuffer Version: \inlinebuffer[version]-en \stoptext but buffers aren't the right tool to store strings like version information. One alternative solution is to set the string with the \setupdocument command. \setupdocument   [version

Re: [NTG-context] how to change metadata halfway through document

2023-01-30 Thread jbf via ntg-context
elegant solution! you can try \setupdocument but i didn't test that -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69

Re: [NTG-context] how to change metadata halfway through document

2023-01-30 Thread Hans Hagen via ntg-context
the end but before the main \stopdocument), this time with [metadata:title={Regulations}] instead of the original [metadata:title={Constitutions}]. However, I have a strong feeling this is not a very elegant solution! you can try \setupdocument but i didn't test

Re: [NTG-context] process list items differently depending on position in list

2022-05-02 Thread Denis Maier via ntg-context
:setup \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{document|p}{xml:*} \stopxmlsetups \xmlregistersetup{xml:setup} \startxmlsetups xml:document \xmlfilter{#1}{/title/command(xml:title)} \xmlfilter{#1}{/author/command(xml:author)} \startdocument \xmlflush{#1} \stopdocument \

Re: [NTG-context] Dynamic document variables from metadata

2022-01-02 Thread Thangalin via ntg-context
ad/meta[@name='author']/command(xml:author)} % What > > goes here to make this dynamic? > > %\xmlfilter{#1}{/head/meta[@name='journal']/command(xml:journal)} > > \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:author > > \setupdocument[author={\xmlatt{#1}{content}}]

Re: [NTG-context] Dynamic document variables from metadata

2022-01-02 Thread Hans Hagen via ntg-context
ead/meta[@name='journal']/command(xml:journal)} \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:author \setupdocument[author={\xmlatt{#1}{content}}] \setupdocument[metadata:author={\xmlatt{#1}{content}}] \setupinteraction[author={\documentvariable{author}}] \stopxmlsetups % How can this be generali

[NTG-context] Dynamic document variables from metadata

2022-01-01 Thread Thangalin via ntg-context
xmlsetups xml:author \setupdocument[author={\xmlatt{#1}{content}}] \setupdocument[metadata:author={\xmlatt{#1}{content}}] \setupinteraction[author={\documentvariable{author}}]\stopxmlsetups % How can this be generalized?%\startxmlsetups xml:journal %\setupdocument[journal={\xmlatt{#1}{conte

Re: [NTG-context] Best way to store text for later use

2020-09-18 Thread Hans van der Meer
w to best store text for later use: > > I've tried using buffers, but this here doesn't work: > > == > \startxmlsetups xml:article-meta > \setupdocument [ > pub-year=\xmlfilter{#1}{/pub-date/year/command(xml:article-meta:pubdate:year)}, > volume=\xm

[NTG-context] Best way to store text for later use

2020-09-18 Thread Denis Maier
Hi, For typesetting XML I'm wondering how to best store text for later use: I've tried using buffers, but this here doesn't work: == \startxmlsetups xml:article-meta     \setupdocument [ pub-year=\xmlfilter{#1}{/pub-date/year/command(xml:article-meta:pubdate:year)}, volume

[NTG-context] update and meeting

2020-09-15 Thread Hans Hagen
th the old one but still gave a presentation using it. Here's an example: \definedocument[thesis] \setupdocument[a=b,e=f] \setupdocument[thesis][a=x,c=d] % \startsetups[thesis:start] \startsetups[document:start] START \stopsetups \startsetups[thesis:stop] % \startsetups[document:stop

Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-06 Thread Jan Willem Flamma
hould be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct

Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-04 Thread Wolfgang Schuster
the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct 2. Use \setvariables or \setupdocument to set the document title, revision etc. 3. Use \startsectionblockenvironment to move

Re: [NTG-context] \documentvariable (used in environment)

2020-07-25 Thread Alan Braslau
exactly doesn't work and do you get the same problems when you set the values in the following minimal example (everything has to be in the same file). begin example \setupdocument [metadata:title={\documentvariable{title}}, metadata:subtitle={\documentvariable{subtitle

Re: [NTG-context] \documentvariable (used in environment)

2020-07-25 Thread Henning Hraban Ramm
wing minimal example (everything has to be in the same >>> file). >>> >>> begin example >>> \setupdocument >>>[metadata:title={\documentvariable{title}}, >>> metadata:subtitle={\documentvariable{subtitle}}, >>>

Re: [NTG-context] \documentvariable (used in environment)

2020-07-25 Thread Wolfgang Schuster
Alan Braslau schrieb am 25.07.2020 um 00:21: On 22/07/20 22:36, Wolfgang Schuster wrote: What exactly doesn't work and do you get the same problems when you set the values in the following minimal example (everything has to be in the same file). begin example \setupdocument

Re: [NTG-context] \documentvariable (used in environment)

2020-07-24 Thread Alan Braslau
On 22/07/20 22:36, Wolfgang Schuster wrote: What exactly doesn't work and do you get the same problems when you set the values in the following minimal example (everything has to be in the same file). begin example \setupdocument   [metadata:title={\documentvariable{title

Re: [NTG-context] \documentvariable (used in environment)

2020-07-22 Thread Wolfgang Schuster
Alan Braslau schrieb am 23.07.2020 um 00:21: Hello, I have put the following in an environment \startenvironment MYENVIRONMENT \setupdocument   [metadata:title={\documentvariable{title}},    metadata:subtitle={\documentvariable{subtitle}},    metadata:author={\documentvariable{author

[NTG-context] \documentvariable (used in environment)

2020-07-22 Thread Alan Braslau
Hello, I have put the following in an environment \startenvironment MYENVIRONMENT \setupdocument [metadata:title={\documentvariable{title}}, metadata:subtitle={\documentvariable{subtitle}}, metadata:author={\documentvariable{author}}, metadata:keywords={\documentvariable{keywords

Re: [NTG-context] how to do adaptation

2019-10-14 Thread Wolfgang Schuster
of the text will be first and how many parts will be shown. Can you ask a separate question for each individual problem. So far, I am trying to get a hang of \setupdocument (https://wiki.contextgarden.net/Project_structure), \startmode (https://wiki.contextgarden.net/Modes), \definecolor (https

[NTG-context] how to do adaptation

2019-10-14 Thread Susanne G. Loeber
will be shown. So far, I am trying to get a hang of \setupdocument (https://wiki.contextgarden.net/Project_structure), \startmode (https://wiki.contextgarden.net/Modes), \definecolor (https://wiki.contextgarden.net/Color) and \defineparagraphs (https://wiki.contextgarden.net/Command/defineparagraphs) I hope

Re: [NTG-context] Title from setupinteraction used in header

2019-02-03 Thread Jan U. Hasecke
Am 03.02.19 um 17:34 schrieb Wolfgang Schuster: > > Use \setupdocument to set the metadata for the PDF. You can access the > values with the \documentvariable command. > > \setuppagenumbering >   [location=] > > \setupheadertexts >   [\documentvariable{metadata

Re: [NTG-context] Title from setupinteraction used in header

2019-02-03 Thread Wolfgang Schuster
into headertexts? Background: authors shall define title, subtitle etc in the product file with setupinteraction (or a better method if available). In the environment file I want to insert theses informations into headers and footers. Use \setupdocument to set the metadata for the PDF. You can

Re: [NTG-context] Language dependency in environment-project file

2018-11-27 Thread Wolfgang Schuster
Marco Patzer schrieb am 27.11.18 um 21:37: Hi, I do have a project structure with environment, project and component files. The language of the individual documents is defined in the components using \setupdocument [language=sv] The environment needs to adjust language-dependent

[NTG-context] Language dependency in environment-project file

2018-11-27 Thread Marco Patzer
Hi, I do have a project structure with environment, project and component files. The language of the individual documents is defined in the components using \setupdocument [language=sv] The environment needs to adjust language-dependent settings. However, when the environment file is read

Re: [NTG-context] Need help with project: TeX capacity exceeded

2018-10-05 Thread Wolfgang Schuster
text etc. at the begin and end of the document (which can be used to insert a titlepage or endpage). You can even use \startdocument (or \setupdocument) to set the document name in the pdf viewer (yes it can also be done with \setupinteraction but \startdocument is nicer). A minimal file would

Re: [NTG-context] Need help with project: TeX capacity exceeded

2018-10-05 Thread Axel Kielhorn
can be > used to insert a titlepage or endpage). You can even use \startdocument (or > \setupdocument) to set the document name in the pdf viewer (yes it can also > be done with \setupinteraction but \startdocument is nicer). > > A minimal file would be > > \star

Re: [NTG-context] Need help with project: TeX capacity exceeded

2018-10-05 Thread Wolfgang Schuster
content in a document environment which has hooks to insert text etc. at the begin and end of the document (which can be used to insert a titlepage or endpage). You can even use \startdocument (or \setupdocument) to set the document name in the pdf viewer (yes it can also be done

Re: [NTG-context] wrapup

2018-09-21 Thread Procházka Lukáš Ing .
as On Fri, 21 Sep 2018 13:01:14 +0200, Hans Hagen wrote: I'll add documentdata.variable so that one can do this: \setupdocument [id=foo] \startluacode luatex.wrapup(function() local id = documentdata.variable("id") if id and id ~= ""

[NTG-context] wrapup

2018-09-21 Thread Hans Hagen
I'll add documentdata.variable so that one can do this: \setupdocument [id=foo] \startluacode luatex.wrapup(function() local id = documentdata.variable("id") if id and id ~= "" then local oldname = file.addsuffix(environment.jobname,&quo

Re: [NTG-context] Presentation sections identified by color and mark

2018-02-04 Thread Hans Hagen
= i + 1;     endfor ;     pa := point (0+len*RealPageNumber) of p ;     %draw (pa+(0,10pt))--(pa+(0,-10pt)) withcolor contrastcolor ;     draw pa withpen pencircle scaled 10pt withcolor contrastcolor ;    fi ;     StopPage ; \stopuseMPgraphic \setupbackgrounds   [t

[NTG-context] Presentation sections identified by color and mark

2018-02-03 Thread jmmora
olor contrastcolor ; fi ; StopPage ; \stopuseMPgraphic \setupbackgrounds [text] [background={PageShape}] \starttext \setupdocument[title={Title},location={Place}] \startdocument \definecolor[BackgroundColor][r=0,g=.7,b=0] \startTopic[title={Topic Green}] Some text A \start

Re: [NTG-context] (again) PDF info fields

2016-07-17 Thread Pablo Rodriguez
On 07/17/2016 09:54 PM, Alan BRASLAU wrote: > Try, > > \setupdocument > [metadata:title={\documentvariable{title}}, >metadata:subtitle={\documentvariable{subtitle}}, >metadata:author={\documentvariable{author}}, >metadata:address={\documentvariable{address}}, &

Re: [NTG-context] (again) PDF info fields

2016-07-17 Thread Alan BRASLAU
Try, \setupdocument [metadata:title={\documentvariable{title}}, metadata:subtitle={\documentvariable{subtitle}}, metadata:author={\documentvariable{author}}, metadata:address={\documentvariable{address}}, metadata:doi={doi:\documentvariable{doi}}, metadata:keywords

Re: [NTG-context] Expansion in PDF metadata

2016-03-04 Thread Marco Patzer
On Fri, 4 Mar 2016 10:34:49 +0100 Hans Hagen <pra...@wxs.nl> wrote: > On 3/4/2016 7:58 AM, Marco Patzer wrote: > > Hi! > > > > How to expand \translate so that it doesn't show up in the PDF > > metadata? Example: > > > > \setupdocument [metadata:titl

Re: [NTG-context] Expansion in PDF metadata

2016-03-04 Thread Hans Hagen
On 3/4/2016 7:58 AM, Marco Patzer wrote: Hi! How to expand \translate so that it doesn't show up in the PDF metadata? Example: \setupdocument [metadata:title=\documentvariable{title}] \mainlanguage [sv] \startdocument [title={\translate[en=Foo, sv=Bar]}] \input knuth \stopdocument

Re: [NTG-context] TeX markup in \setupinteraction for PDF metadata fields

2016-01-17 Thread Wolfgang Schuster
{title}, author=\getvariable{information}{title}] \starttext \unknown \stoptext There is also the \setupdocument command (a simple wrapper for the \setvariables command) which uses predefined keywords to set fields in the pdf file. You can access the values from \setupdocument command i

Re: [NTG-context] TeX markup in \setupinteraction for PDF metadata fields

2016-01-17 Thread Kate F
ormation] > [title=Document title, >author=Author name] > > \setupinteraction > [ state=start, > title=\getvariable{information}{title}, >author=\getvariable{information}{title}] > > \starttext > \unknown > \stoptext > > > There is also

Re: [NTG-context] TeX markup in \setupinteraction for PDF metadata fields

2016-01-17 Thread Wolfgang Schuster
hor=Me, metadata:author=\documentvariable{author}] ... \stopdocument I would separate both settings and put \setupdocument somewhere in the preamble. \setupdocument [metadata:title=\documentvariable{title}, metadata:author=\documentvariable{author}] \startdocument [title=My title, aut

Re: [NTG-context] TeX markup in \setupinteraction for PDF metadata fields

2016-01-17 Thread Wolfgang Schuster
Alan BRASLAU <mailto:alan.bras...@cea.fr> 17. Januar 2016 um 19:55 On Sun, 17 Jan 2016 19:27:31 +0100 How does this play with \startdocument [title=Document title, author=Me] It doesn’t matter if you set the values with \setupdocument or \startdocument. Here, I learn about metadata

Re: [NTG-context] TeX markup in \setupinteraction for PDF metadata fields

2016-01-17 Thread Alan BRASLAU
values and access > them with \getvariables: > > \setvariables >[information] >[title=Document title, > author=Author name] > > \setupinteraction >[ state=start, > title=\getvariable{information}{title}, > author=\getvariable{information}{title}] > >

Re: [NTG-context] \appendtoks and structuring commands

2015-03-27 Thread Sam Ḥilluc
On 2015-03-25 10:23, Hans Hagen wrote: \startsetups [document:titlepage] bla bla \documentvariable{title} bla bla \stopsetups \setupdocument [before=\directsetup{document:titlepage}] \startdocument[title=Some title] ... \stopdocument Thanks. Can one always use

Re: [NTG-context] \appendtoks and structuring commands

2015-03-27 Thread Hans Hagen
On 3/27/2015 11:27 PM, Sam Ḥilluc wrote: On 2015-03-25 10:23, Hans Hagen wrote: \startsetups [document:titlepage] bla bla \documentvariable{title} bla bla \stopsetups \setupdocument [before=\directsetup{document:titlepage}] \startdocument[title=Some title] ... \stopdocument Thanks

Re: [NTG-context] \appendtoks and structuring commands

2015-03-25 Thread Hans Hagen
\documentvariable{title} bla bla \stopsetups \setupdocument [before=\directsetup{document:titlepage}] \startdocument[title=Some title] ... \stopdocument - Hans Hagen | PRAGMA ADE

Re: [NTG-context] Hooking stoptext

2013-10-08 Thread Marco Patzer
On 2013–10–08 Procházka Lukáš Ing. - Pontex s. r. o. wrote: I'm trying to hook commands.stoptext()... There is already a hook for that. No need to tinker with Lua. \setupexternalfigures [location=default] \setupdocument [after=\setups{document:after}] \startsetups [document:after

Re: [NTG-context] Hooking stoptext

2013-10-08 Thread Marco Patzer
On 2013–10–08 Marco Patzer wrote: On 2013–10–08 Procházka Lukáš Ing. - Pontex s. r. o. wrote: I'm trying to hook commands.stoptext()... There is already a hook for that. No need to tinker with Lua. \setupexternalfigures [location=default] \setupdocument [after=\setups

Re: [NTG-context] Hooking stoptext

2013-10-08 Thread Procházka Lukáš Ing . - Pontex s . r . o .
] \setupdocument [after=\setups{document:after}] \startsetups [document:after] \startTEXpage \externalfigure [cow] \stopTEXpage \stopsetups \startdocument \input knuth \stopdocument Marco OK... But - is there a solution more close and more Lua to that mine? The example is much simpler than

Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-10 Thread Hans Hagen
firstpage (also new key in mult) lastpage (aso new key in mult) - The title, subtitle and author inherit from \setupinteraction which already inherits from \setupdocument (metadata namespace). - In mtx-epub these variables are picked up (from the epub job specification) and firstpage / lastpage

Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-09 Thread Hans Hagen
On 9-6-2012 02:38, Aditya Mahajan wrote: I never realized that there was a \setupdocument! it has been there for a while ... the idea is to set up some vars at the top (of whatever) and use them later (e.g. variables used in a title page or colofon). Nothing mandate, just convenience

Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-09 Thread Andy Thomas
(aso new key in mult) - The title, subtitle and author inherit from \setupinteraction which already inherits from \setupdocument (metadata namespace). - In mtx-epub these variables are picked up (from the epub job specification) and firstpage / lastpage are added to the images list

Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Hans Hagen
={}] Backends other than epub can safely ignore the directive. better is \setupexport (actually, we do have \setupdocument which makes een more sense: (1) take from setupdocument (2) if empty take from setupexport (3) otherwise take from setupinteraction In one of your earlier threads

Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Hans Hagen
and author inherit from \setupinteraction which already inherits from \setupdocument (metadata namespace). - In mtx-epub these variables are picked up (from the epub job specification) and firstpage / lastpage are added to the images list. Nothing has been checked and the firstpage/lastpage image

Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Aditya Mahajan
in mult) - The title, subtitle and author inherit from \setupinteraction which already inherits from \setupdocument (metadata namespace). I never realized that there was a \setupdocument! This might be the best way to have a document title in ConTeXt: \startsetups document:start code

Re: [NTG-context] Hooking \stoptext

2012-03-07 Thread Wolfgang Schuster
{\ctxlua{…}% \stoptext} and use them instead of \starttext and \stoptext. Or you use the predefined document environment which has before and after keys. \setupdocument[after={\blank\midaligned{\bf THE END}}] \startdocument \input knuth \stopdocument Wolfgang

[NTG-context] Set document version

2009-05-02 Thread Wolfgang Schuster
Hi Hans, ConTeXt has a command (\version[...]) to set the version of the document but as developer there is no way to get access to this value. Can you give us a defined register which can be used from other modules (e.g. fixme). I would even prefer a new command like \setupdocument where